/**   
 * @Title: AsyncController.java 
 * @Package com.dragon.learn.async 
 * @Description: TODO(用一句话描述该文件做什么) 
 * @author dragon   
 * @date 2018年9月5日 下午6:50:14 
 * @version V1.0   
 */
package com.dragon.learn.async;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.context.request.async.DeferredResult;

/** 
 * 
 * @ClassName: AsyncController 
 * @Description: TODO(这里用一句话描述这个类的作用) 
 * @author dragon
 * @date 2018年9月5日 下午6:50:14 
 *  
 */

@RestController
@RequestMapping(value = "async")
public class AsyncController {

	@Autowired
	PushService pushService;

	@RequestMapping(value = "defer")
	public DeferredResult<String> defer(){
		DeferredResult<String> asyncUpdate = pushService.getAsyncUpdate();
		return asyncUpdate;	
	}
}
